<?php
/**
 * @package   auto_occasion
 * @subpackage 
 * @author    CMS
 * @copyright 2011
 * @license    All rights reserved
 */


/**
 * Classe permettant de les parametres défini en BO : nb annonce par page, timeout pub etc...
 *actus
 */
class parametre {

    /**
     * get param by id
     */
    public static function get ($idParam) {

        jClasses::inc('commun~common');
        return common::chargeParId($idParam, 'ao_parametre');
    }

	public static function getParamsByName($_zName) {
		
		$oCnx    = jDb::getConnection();
        $zQuery	 = " 
						SELECT 
							param_id,
							param_name,
							param_content
						FROM  
							ao_parametre
						WHERE   param_name = '$_zName'
				    ";
        $oRs	= $oCnx->query($zQuery);

		$oRow	= $oRs->fetch() ;
		
		return $oRow;
	}
    
}